﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EyeOpen.Validation.Entities
{
    /// <summary>
    /// Represents a person.
    /// </summary>
    public class Person : IValidableEntity
    {
        string name;
        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>The name.</value>
        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        /// <summary>
        /// Determines whether this person is valid.
        /// </summary>
        /// <returns>
        /// 	<c>true</c> if this person is valid; otherwise, <c>false</c>.
        /// </returns>
        public bool IsValid()
        {
            return new ValidatorFactory().GetValidator<Person>().IsValid<Person>(this);
        }
    }
}
